#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
int cmp_int(const void* s1, const void* s2)
{
    return *((int*)s1) - *((int*)s2);
}
int* findDisappearedNumbers(int* nums, int numsSize, int* returnSize) {
    int i = 0;
    qsort(nums, numsSize, sizeof(int), cmp_int);
    int* new = (int*)malloc(numsSize * sizeof(int));
    int k = 0;
    for (i = 1; i < numsSize; i++)
    {
        int j = nums[i] - nums[i - 1];
        if (j > 1)
        {
            for (k = 1; k < j; k++)
            {
                new[*returnSize] = nums[i - 1] + k;
                (*returnSize)++;
            }
        }
    }
    return new;
}
int main()
{
    int nums[2] = {1,1};
    int* returnSize = 0;
    int*a=findDisappearedNumbers(nums,8, &returnSize);
    for (int i = 0;i<returnSize; i++)
    {
        printf("%d ", a[i]);
    }
}